<template>
  <vue-office-excel
    :src="fileUrl" 
    @rendered="rendered"/>
</template>

<script>
//引入VueOfficeExcel组件
import VueOfficeExcel from '@vue-office/excel'
//引入相关样式
import '@vue-office/excel/lib/index.css'

export default {
  name: 'officeExcel',
  components:{
    VueOfficeExcel
  },
  props: {
    fileUrl: {
      type: String,
      required: true
    }
  },
  methods:{
    rendered(){
      console.log("excel=>>渲染完成")
    }
  }
}
</script>